public class Grade {
    private int m;//疫情数据
    private int n;//风险等级
    public int  Judge(int m){
        if(m>=2000){
            n = 1;
            System.out.println("风险等级为1");
        }
        else if(m>=1300){
            n = 2;
            System.out.println("风险等级为2");
        }
        else if(m>=800){
            n = 3;
            System.out.println("风险等级为3");
        }
        else if(m>=500){
            n = 4;
            System.out.println("风险等级为4");
        }
        else if(m>=200){
            n = 5;
            System.out.println("风险等级为5");
        }
        else if(m>=50){
            n = 6;
            System.out.println("风险等级为6");
        }
        else if(m<50&&m>=0){
            n = 7;
            System.out.println("风险等级为7");
        }
        else if(m<0){
            System.out.println("数据错误");
            return -1;
        }
        return n;
    }

}

